package com.jctrip.hotel.source.model.CnBooking.resp;

import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;

import lombok.Data;

/**
 * @Author henry
 * @Date 2023/7/2 09:50
 * @Description
 */
@Data
public class QueryCityResp extends BaseResponse implements Serializable {
    @JacksonXmlElementWrapper
    @JacksonXmlProperty(localName = "Data")
    private BaseData data;

    @Data
    public static class BaseData {
        @JacksonXmlElementWrapper(localName = "Countrys")
        @JacksonXmlProperty(localName = "Country")
        private List<Country> countrys;
    }

    @Data
    public static class Country {
        @JacksonXmlProperty(localName = "CountryId", isAttribute = true)
        private String countryId;
        @JacksonXmlProperty(localName = "CountryName", isAttribute = true)
        private String countryName;
        @JacksonXmlProperty(localName = "SpellNameShort", isAttribute = true)
        private String spellNameShort;
        @JacksonXmlElementWrapper(localName = "Province", useWrapping = false)
        @JacksonXmlProperty(localName = "Province")
        private List<Province> provinces;

    }

    @Data
    public static class Province {
        @JacksonXmlProperty(localName = "ProvinceId", isAttribute = true)
        private String provinceId;
        @JacksonXmlProperty(localName = "ProvinceName", isAttribute = true)
        private String provinceName;
        @JacksonXmlProperty(localName = "SpellNameShort", isAttribute = true)
        private String spellNameShort;
        @JacksonXmlElementWrapper(localName = "City", useWrapping = false)
        @JacksonXmlProperty(localName = "City")
        private List<City> city;
    }

    @Data
    public static class City {
        @JacksonXmlProperty(localName = "CityId", isAttribute = true)
        private String cityId;
        @JacksonXmlProperty(localName = "CityName", isAttribute = true)
        private String cityName;
        @JacksonXmlProperty(localName = "SpellNameShort", isAttribute = true)
        private String spellNameShort;
        @JacksonXmlElementWrapper(localName = "Location", useWrapping = false)
        @JacksonXmlProperty(localName = "Location")
        private List<Location> location;
    }

    @Data
    public static class Location{
        @JacksonXmlProperty(localName = "LocationId", isAttribute = true)
        private String locationId;
        @JacksonXmlProperty(localName = "LocationName", isAttribute = true)
        private String locationName;
    }
}
